package tsli.acm.ctrl;

import java.text.DecimalFormat;

import tsli.acm.dao.PersistencyDAO;
import tsli.acm.dao.SFCCommissionPositiveDAO;
import tsli.acm.database.Database;

public class OEComponentAPIMethod {
//	String vaClosYm = "201411";
//	
//	public void calculateOE(){
//		Database db = new Database();
//		SFCCommissionPositiveDAO voSFCCommissionPositiveDAO = new SFCCommissionPositiveDAO(db);
//		PersistencyDAO voPersistencyDAO = new PersistencyDAO(db);
//		String vaGrader = voSFCCommissionPositiveDAO.findTotalGrader(vaClosYm);
//		String vaAcProducer = voSFCCommissionPositiveDAO.findActiveProducer(vaClosYm);
//		double vnOrganizationPart = Double.parseDouble( vaGrader) + Double.parseDouble( vaAcProducer);
//		String[] voDataProductionPart = voPersistencyDAO.getProductionPartForOE(vaClosYm).split("/");
//		double vnProductionPart = Double.parseDouble(voDataProductionPart[0]);
//		
//		double total = vnOrganizationPart + vnProductionPart;
//		
//		DecimalFormat voDecimalFormat = new DecimalFormat("#.##");
//		
//		System.out.println("Organization Part : "+vnOrganizationPart);
//		System.out.println("Production Part : "+vnProductionPart);
//		System.out.println("PC : "+voDecimalFormat.format(Double.parseDouble(voDataProductionPart[1]))
//				+"  ARYP(2-5) : "+voDecimalFormat.format(Double.parseDouble(voDataProductionPart[2]))
//				+"  Persistency : "+voDecimalFormat.format(Double.parseDouble(voDataProductionPart[3]))+"%");
//		System.out.println("Total : "+voDecimalFormat.format(total));
//	}
}
